/**
 * Alibaba.com.cn Inc.
 * Copyright (c) 2004-2021 All Rights Reserved.
 */
package com.smart.controller;

import com.smart.common.WebResponse;
import com.smart.model.request.UserIdentificationRequest;
import com.smart.service.UserIdentificationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * @author zhanghong
 * @version DeviceController.java, v 0.1 2023/7/16 11:10 下午 DeviceController Exp $$
 */
@RestController
@RequestMapping("/")
@Api(value = "人证机数据", tags = {"人证机数据"})
public class DeviceController {

    @Autowired
    private UserIdentificationService userIdentificationService;

    @ApiOperation("【机器端】新增识别人员信息")
    @PostMapping("/rd")
    public WebResponse<Boolean> add(@Valid @RequestBody UserIdentificationRequest request) {
        return WebResponse.build(userIdentificationService.record(request));
    }
}
